/*     */ package network;
/*     */ 
/*     */ import java.awt.Point;
/*     */ import java.util.Enumeration;
/*     */ import java.util.Vector;
/*     */ 
/*     */ final class X5
/*     */   implements Cloneable
/*     */ {
/*     */   private static final int x3o72 = 6;
/*     */   private static final int x1041 = 0;
/*     */   private static final int SE = 1;
/*     */   private static final int x417o = 2;
/*     */   private static final int NE = 3;
/*     */   private static final int x3828 = 4;
/*     */   private static final int x2o85 = 5;
/*     */   private static final int x2115 = 6;
/*     */   private static final int SW = 7;
/*  19 */   private static X2 xxo = null;
/*     */   private int x3556;
/*     */   private Vector x8505;
/*     */   private int x9409;
/*     */   private Point pt;
/*     */ 
/*     */   private X5(int paramInt1, Point paramPoint, int paramInt2)
/*     */   {
/*  27 */     this.x9409 = paramInt1;
/*  28 */     this.x3556 = paramInt2;
/*  29 */     this.pt = paramPoint;
/*  30 */     this.x8505 = new Vector(3);
/*  31 */     this.x8505.addElement(new Point(paramPoint));
/*     */   }
/*     */ 
/*     */   public Object clone() {
/*  35 */     X5 localX5 = null;
/*     */     try {
/*  37 */       localX5 = (X5)super.clone();
/*  38 */       localX5.pt = new Point(this.pt);
/*  39 */       localX5.x8505 = ((Vector)this.x8505.clone()); } catch (CloneNotSupportedException localCloneNotSupportedException) {
/*     */     }
/*  41 */     return localX5;
/*     */   }
/*     */ 
/*     */   private static int xooxo(int paramInt) {
/*  45 */     return (paramInt + 4) % 8;
/*     */   }
/*     */ 
/*     */   boolean oxoxo() {
/*  49 */     Point localPoint1 = oooxx();
/*  50 */     Point localPoint2 = ooxxo();
/*  51 */     if ((this.x8505.size() >= 6) && (xxo.oxoxx(localPoint1.x, localPoint1.y, this.x9409)) && (xxo.oxoxx(localPoint2.x, localPoint2.y, this.x9409)))
/*     */     {
/*  54 */       if ((this.x9409 == 0) && (localPoint1.y != localPoint2.y)) return true;
/*  55 */       if ((this.x9409 == 1) && (localPoint1.x != localPoint2.x)) return true;
/*     */     }
/*  57 */     return false;
/*     */   }
/*     */ 
/*     */   static Enumeration oxxxo(X2 paramX2, int paramInt)
/*     */   {
/*  62 */     Vector localVector = new Vector();
/*     */ 
/*  65 */     xxo = paramX2;
/*     */     int j;
/*  66 */     int i = j = 0;
/*     */     X5 localX51;
/*  67 */     if (paramInt == 0)
/*  68 */       for (i = 1; i < 8; i++){
/*  69 */         if (paramX2.oooxx(i, j) == paramInt) {
/*  70 */           localVector.addElement(new X5(paramInt, new Point(i, j), 7));
/*  71 */           localX51 = new X5(paramInt, new Point(i, j), 4);
/*  72 */           if (localX51.xoooo() != null) localVector.addElement(localX51);
/*  73 */           localX51 = new X5(paramInt, new Point(i, j), 1);
/*  74 */           if (localX51.xoooo() == null) continue; localVector.addElement(localX51);
/*     */         	}
						}
/*     */     else {
/*  77 */       for (j = 1; j < 8; j++) {
/*  78 */         if (paramX2.oooxx(i, j) == paramInt) {
/*  79 */           localVector.addElement(new X5(paramInt, new Point(i, j), 2));
/*  80 */           localX51 = new X5(paramInt, new Point(i, j), 1);
/*  81 */           if (localX51.xoooo() != null) localVector.addElement(localX51);
/*  82 */           localX51 = new X5(paramInt, new Point(i, j), 3);
/*  83 */           if (localX51.xoooo() == null) continue; localVector.addElement(localX51);
/*     */         }
/*     */       }
/*     */     }
/*     */ 
/*  88 */     int k = 0;
/*  89 */     while (k < localVector.size()) {
/*  90 */       localX51 = (X5)localVector.elementAt(k);
/*  91 */       k++;
/*     */       Object localObject;
/*  92 */       while ((localObject = localX51.xoooo()) != null) {
/*  93 */         localX51.pt.x = ((Point)localObject).x;
/*  94 */         localX51.pt.y = ((Point)localObject).y;
/*  95 */         localX51.x8505.addElement(localObject);
/*     */ 
/*  97 */         if (paramX2.oxoxx(((Point)localObject).x, ((Point)localObject).y, paramInt))
/*     */           continue;
/*  99 */         int m = 0;
/* 100 */         int n = localX51.x3556;
/* 101 */         int i1 = xooxo(n);
/* 102 */         for (int i2 = 0; i2 < 8; i2++) {
/* 103 */           if ((i2 != n) && (i2 != i1)) {
/* 104 */             if (m == 0) {
/* 105 */               localX51.x3556 = i2;
/* 106 */               m = 1;
/*     */             } else {
/* 108 */               X5 localX52 = (X5)localX51.clone();
/* 109 */               localX52.x3556 = i2;
/* 110 */               if (localX52.xoooo() != null)
/* 111 */                 localVector.addElement(localX52);
/*     */             }
/*     */           }
/*     */         }
/*     */       }
/*     */     }
/* 117 */     return (Enumeration)localVector.elements();
/*     */   }
/*     */ 
/*     */   public String toString() {
/* 121 */     StringBuffer localStringBuffer = new StringBuffer();
/* 122 */     Enumeration localEnumeration = oxxoo();
/*     */     while (true) {
/* 124 */       Point localPoint = (Point)localEnumeration.nextElement();
/* 125 */       localStringBuffer.append(String.valueOf(localPoint.x) + String.valueOf(localPoint.y));
/* 126 */       if (!localEnumeration.hasMoreElements()) break;
/* 127 */       localStringBuffer.append(" - ");
/*     */     }
/* 129 */     return localStringBuffer.toString();
/*     */   }
/* 133 */   private Point xoooo() { Point localPoint = new Point(this.pt);
/*     */     int i;
/*     */     do { switch (this.x3556) { case 0:
/* 136 */         localPoint.y -= 1; break;
/*     */       case 6:
/* 137 */         localPoint.x -= 1; break;
/*     */       case 4:
/* 138 */         localPoint.y += 1; break;
/*     */       case 2:
/* 139 */         localPoint.x += 1; break;
/*     */       case 1:
/* 140 */         localPoint.y += 1; localPoint.x += 1; break;
/*     */       case 7:
/* 141 */         localPoint.y += 1; localPoint.x -= 1; break;
/*     */       case 3:
/* 142 */         localPoint.y -= 1; localPoint.x += 1; break;
/*     */       case 5:
/* 143 */         localPoint.y -= 1; localPoint.x -= 1;
/*     */       }
/* 145 */       if (!xxo.oxxxo(localPoint.x, localPoint.y)) return null;
/*     */ 
/* 147 */       i = xxo.oooxx(localPoint.x, localPoint.y);
/* 148 */       if (this.x8505.indexOf(localPoint) >= 0)
/* 149 */         return null;
/* 150 */       if (i == this.x9409)
/* 151 */         return localPoint; }
/* 152 */     while (i == 2);
/*     */ 
/* 154 */     return null;
/*     */   }
/*     */ 
/*     */   public boolean equals(X5 paramX5)
/*     */   {
/* 159 */     return this.x8505.equals(paramX5.x8505);
/*     */   }
/*     */ 
/*     */   Point oooxx() {
/* 163 */     return (Point)this.x8505.firstElement();
/*     */   }
/*     */ 
/*     */   Point ooxxo() {
/* 167 */     return (Point)this.x8505.lastElement();
/*     */   }
/*     */ 
/*     */   Enumeration oxxoo() {
/* 171 */     return this.x8505.elements();
/*     */   }
/*     */ }

/* Location:           C:\Users\Justin\Desktop\pj2\
 * Qualified Name:     network.X5
 * JD-Core Version:    0.6.0
 */